package com.kd.service.admin.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.kd.bean.admin.AdminBasic;
import com.kd.dao.admin.IAdminBasicDao;
import com.kd.service.admin.IAdminBasicService;

/**
 * 管理员相关的类
 * --管理员-求职者->我的消息（IAdminBasicDao）--
 * @author ZFC
 *
 */
@Service
@Transactional
public class AdminBasicServiceImpl implements IAdminBasicService{

	@Autowired
	private IAdminBasicDao basicDao;
	
	@Override
	public Boolean insertBasicJuBaoMessage(AdminBasic adminBasic) throws Exception {
		
		return basicDao.insertBasicJuBaoMessage(adminBasic)>0;
	}

	@Override
	public PageInfo<AdminBasic> queryBasic_id(Integer pageNum, Integer pageSize, Integer basic_id) throws Exception {
		PageHelper.startPage(pageNum, pageSize);
		List<AdminBasic> list = basicDao.queryBasic_id(basic_id);
		PageInfo<AdminBasic> info = new PageInfo<>(list);
		return info;
	}

	@Override
	public Boolean updateAdminBasicAdminRec_news_status(Integer adminRec_news_status, Integer adminBasic_news_id)
			throws Exception {
		
		return basicDao.updateAdminBasicAdminRec_news_status(adminRec_news_status, adminBasic_news_id)>0;
	}

}
